package com.zjj;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class DubboConsumerDemo  {

    @Reference(version = "default")
    private DemoService demoService;

    public static void main(String[] args)  {
        ConfigurableApplicationContext context = SpringApplication.run(DubboConsumerDemo.class);
        DemoService demoService = context.getBean(DemoService.class);
            for (int a = 0 ; a <10 ;a++){
        System.out.println((demoService.sayHello("你好")));
            }
    }

}
